import request from "@/utils/request.js";

// 轮播图
export function slideshows() {
  return request({
    url: "/xcx/qz/home/slideshows",
    method: "get",
  });
}
// 广告轮播
export function streamer() {
  return request({
    url: "/xcx/qz/home/streamer",
    method: "get",
  });
}
// 获取首页弹窗广告
export function popupAd() {
  return request({
    url: "/xcx/qz/home/advertisings",
    method: "get",
  });
}
// 获取时间挫
export function getTime() {
  return request({
    url: "/xcx/qz/home/getTimestamp",
    method: "get",
  });
}
//获取首页金刚区
export function getQuicklinks() {
  return request({
    url: "/xcx/qz/home/quicklinks",
    method: "get",
  });
}
// 获取岗位列表（岗位模块通用）
export function getJobs(data) {
  return request({
    url: "/xcx/qz/home/positionList",
    method: "post",
    data,
  });
}
// 获取岗位详情
export function getJobsDetail(positionId) {
  return request({
    url: "/xcx/qz/home/positionInfo/" + positionId,
    method: "get",
  });
}
// 岗位申请
export function applyJobs(data) {
  return request({
    url: "/xcx/qz/home/positionInfo/applyFor",
    method: "post",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
    data,
  });
}
// 消息
export function getMessage(data) {
  return request({
    url: "/xcx/qz/message/list",
    method: "get",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
    data,
  });
}

// 改变消息状态
export function exitMessage(params) {
  return request({
    url: "/xcx/qz/message/exit/" + params,
    method: "put",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}

// 获取收藏状态
export function getCollectState(positionId) {
  return request({
    url: "/xcx/qz/home/getCollectState/" + positionId,
    method: "get",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}
// 收藏
export function collect(data) {
  return request({
    url: "/xcx/qz/home/collect",
    method: "put",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
    data,
  });
}
// 获取当前用户所在门店及附近门店
export function getStoreList() {
  return request({
    url: "/xcx/qz/my/getSiteStore",
    method: "get",
  });
}
